#ifndef _SE_GLOBALCONTEXT_
#define _SE_GLOBALCONTEXT_

#include "Core/ConfigManager.h"
#include "Core/Logger.h"
#include "Render/WindowAPI.h"
#include "Render/RenderAPI.h"
#include "ImGui/ImGuiAPI.h"

namespace SE
{
	class GlobalContext final : public Singleton<GlobalContext>
	{
	private:
		Ref<ConfigManager>		mConfigManager;
		Ref<Logger>				mLogger;
		Ref<WindowAPI>			mWindowAPI;
		Ref<WindowContext>		mWindowContext;
		Ref<RenderAPI>			mRenderAPI;
		Ref<RenderContext>		mRenderContext;
		Ref<ImGuiAPI>			mImGuiAPI;
		Ref<ImGuiContext>		mImGuiContext;

	public:
		AutoRegisterSingleton(GlobalContext)

		static Ref<ConfigManager>		GetConfigManager()		{ return Get().mConfigManager; }
		static Ref<Logger>				GetLogger()				{ return Get().mLogger; }
		static Ref<WindowAPI>			GetWindowAPI()			{ return Get().mWindowAPI; }
		static Ref<WindowContext>		GetWindowContext()		{ return Get().mWindowContext; }
		static Ref<RenderAPI>			GetRenderAPI()			{ return Get().mRenderAPI; }
		static Ref<RenderContext>		GetRenderContext()		{ return Get().mRenderContext; }
		static Ref<ImGuiAPI>			GetImGuiAPI()			{ return Get().mImGuiAPI; };
		static Ref<ImGuiContext>		GetImGuiContext()		{ return Get().mImGuiContext; };

		static void Start();
		static void Shutdown();
	};
} // !namespace SE

#endif // !_SE_GLOBALCONTEXT_